package cn.jsu.oj.dispatchServer.pojo;

import cn.jsu.oj.dispatchServer.parsing.PackType;

import java.util.Arrays;

/**
 * @author 24987
 *
 * 用于结果写回的包
 */

@PackType(typeNo = 8)
public class JudgeResult extends AbstractPack {
    /**
     * 流水号
     */
    private long serialNumber;
    /**
     * 编译信息
     */
    private String compilationInformation;

    /**
     * 运行时间(ms)
     */
    private int[] runTime;

    /**
     * 运行内存(kb)
     */
    private int[] runMemory;

    /**
     * 测试点结果
     */
    private byte[] pointResult;

    public long getSerialNumber() {
        return serialNumber;
    }

    public void setSerialNumber(long serialNumber) {
        this.serialNumber = serialNumber;
    }

    public String getCompilationInformation() {
        return compilationInformation;
    }

    public void setCompilationInformation(String compilationInformation) {
        this.compilationInformation = compilationInformation;
    }

    public int[] getRunTime() {
        return runTime;
    }

    public void setRunTime(int[] runTime) {
        this.runTime = runTime;
    }

    public int[] getRunMemory() {
        return runMemory;
    }

    public void setRunMemory(int[] runMemory) {
        this.runMemory = runMemory;
    }

    public byte[] getPointResult() {
        return pointResult;
    }

    public void setPointResult(byte[] pointResult) {
        this.pointResult = pointResult;
    }

    public JudgeResult() {
    }

    public JudgeResult(long serialNumber, String compilationInformation, int[] runTime, int[] runMemory, byte[] pointResult) {
        this.serialNumber = serialNumber;
        this.compilationInformation = compilationInformation;
        this.runTime = runTime;
        this.runMemory = runMemory;
        this.pointResult = pointResult;
    }

    @Override
    public String toString() {
        return "JudgeResult{" +
                "serialNumber=" + serialNumber +
                ", compilationInformation='" + compilationInformation + '\'' +
                ", runTime=" + Arrays.toString(runTime) +
                ", runMemory=" + Arrays.toString(runMemory) +
                ", pointResult=" + Arrays.toString(pointResult) +
                '}';
    }
}
